home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
prog
/
dnalib59.arj
/
ASMPRINT.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-02-06
|
2KB
|
41 lines
DECLARE SUB GetStrLoc()
SUB QPrint(BYVAL Row%,BYVAL Col%,BYVAL St$, BYVAL Attr%)PUBLIC
! push si ; Save em
! push di ;
! push ds ;
! mov ax,St$ ; get the handle
! push ax ; push it
! call getstrloc ; Get String info
! mov ds,dx ; Set the string seg
! mov si,ax ; set string ptr
! cmp cx,0 ; Quit if string = 0
! je Done ;
! xor ax,ax ;
! mov ax,Row% ; get the row
! dec al ; convert row to zero base
! mov bl,80 ; get the number of cols
! mul bl ; multiply # of cols * rows
! add ax,Col% ; add the column
! dec al ; convert column to zero base
! mov di,ax ; offset within video page
! shl di,1 ; account for color/attribute
! mov ax,&HB800 ; default to mono card segment
Display:
! mov es,ax ; point ES to video
! mov ax,Attr% ; color/attribute
! mov ah,al
Printit:
! lodsb ; get a char into al
! stosw ; write char and attr to screen
! loop Printit ; go for entire string
Done: ' (len\counter already in cx)
! pop ds ; pop em
! pop di ;
! pop si ;
END SUB